<div class="row-fluid">
<div class="span8">
<?php if(!empty($planespagos)): ?>
<div class="span6">
						<div class="alert alert-block alert-error fade in">
							<a href="#" data-dismiss="alert" class="close">x</a>
							<h4 class="alert-heading">
								Registro Plan de pago
							</h4>
							<ul>
								<li>
									Registra nuevo Plan.
								</li>
								<li>
									Asignar pagos por Plan.
								</li>
							</ul>
							<p>
								<a href="<?php echo $this->Html->url(array('action'=>'add')) ?>" class="btn btn-inverse"><i class="splashy-check"></i> Registrar Plan</a>
							</p>
						</div>
					</div>
     <div class="span10">
	<h3 class="heading"><?php echo __('Plan de pagos');?></h3>
	<table class="table table-striped table-bordered dTableR" id="dt_a">
    <thead>
	<tr>
			<th>Item</th>
			<th>Nombre</th>
			<th>Descripci&oacute;n</th>
			<th>Acciones</th>
	</tr>
    </thead>
	<tbody>
    <?php
	
    foreach ($planespagos as $planespago): ?>
	
    <tr>
		<td><?php echo h($planespago['Planespago']['id']); ?>&nbsp;</td>
		<td><?php echo h($planespago['Planespago']['nombre']); ?>&nbsp;</td>
		<td><?php echo h($planespago['Planespago']['descripcion']); ?>&nbsp;</td>
		<td>
			<?php //echo $this->Html->link(__('Ver'), array('action' => 'view', $planespago['Planespago']['id'])); ?>
            <?php 
            echo $this->Html->image("iconos/detalle.png", array(
            "title" => "Ver",
            'url' => array('action' => 'view', $planespago['Planespago']['id'])
            ));
            ?> 
			<?php echo $this->Ajax->link(
            $this->Html->image("iconos/edit.png"),
            array( 'controller' => 'planespagos', 'action' => 'ajaxedit', $planespago['Planespago']['id']),
            array( 'update' => 'pagos',
                                        'title' => 'Edita el Plan de Pago',
                                        'escape' => false));
            ?>
            <?php 
                                echo $this->Html->image("iconos/elim.png", array(
                                    "title" => "Eliminar",
                                    'url' => array('action' => 'delete', $planespago['Planespago']['id'])
                                ));
                            ?>
            <?php //echo $this->Form->postLink(__('Eliminar'), array('action' => 'delete', $planespago['Planespago']['id']), null, __('Esta seguro de querer eliminar el # %s?', $planespago['Planespago']['id'])); ?>
		</td>
	</tr>
    
<?php endforeach; ?>
	</tbody>
    </table>

<?php else: ?>
<h3 class="heading">No exiten planes registrados</h3>
<?php endif; ?>
<?php echo $this->Ajax->link(
                                'Registrar nuevo plan',
                                array( 'controller' => 'planespagos', 'action' => 'ajaxadd'),
                                array( 'update' => 'pagos', 'class'=>'btn btn-gebo')
                                );
                            ?>
</div>
</div>
<div class="span4">
<div id="pagos">
</div>
</div>
<div class="span4">
					<div id="cargaDatos">
					</div>
					<div class="alert alert-block alert-warning fade in">
						<h4 class="alert-heading">
							Registro de Plan de Pago
						</h4>
						<p>
							Una vez registrados el plan de pago se procedera a ver la lista de pagos.
						</p>
						<p>
						<!--	<a href="<?php echo $this->Html->url(array('controller'=>'Paralelos', 'action'=>'index'))?>" class="btn btn-inverse">Realizar</a> -->
						</p>
					</div>
				</div>
</div>
<!-- sidebar -->
<?php echo $this->element('sidebar/planespago'); ?>
<!-- fin sidebar -->
<?php //llamamos scripts tablas ?>
<?php echo $this->element('jstablas'); ?>
